package org.cqut.system.user.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.cqut.system.user.domain.SysAuth;
import org.cqut.system.user.domain.SysRole;
import org.cqut.system.user.domain.SysUser;
import org.cqut.system.user.vo.UserVo;
import org.springframework.web.multipart.MultipartFile;

import javax.mail.MessagingException;
import java.util.List;

/**
 *
 */
public interface SysUserService extends IService<SysUser> {

    List<SysAuth> findAuthByUserId(Long id);

    SysUser findUserByUserName(String username);

    List<SysRole> findRoleByUserId(Long id);

    boolean editUser(UserVo userVo);

    boolean register(SysUser user);

    UserVo findUserVoByUsername(String username);

    boolean updateAvatar(String path, String username);

    boolean updateNickname(UserVo userVo);

    boolean updatePasswordByUsername(SysUser user);

    String importUser(MultipartFile file);

    IPage<UserVo> getStudentList(int page, int limit, String condition);

    boolean disableAccount(String userId);

    boolean enableAccount(String userId);

    boolean insertStudent(SysUser user);

    boolean resetPassword(String userId);
}
